// 返回传入时间戳那天的0时刻，不传则返回当天0时刻
export function h0(timestamp = Date.now()) {
  const target = new Date(timestamp);

  target.setHours(0);
  target.setMinutes(0);
  target.setSeconds(0);
  target.setMilliseconds(0);

  return target.getTime();
}